<template>
	<view class="content">
		<form class="app-update-pv">
			
									<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"#ccc","margin":"","borderWidth":"0","borderStyle":"solid","height":"108rpx"}' class="cu-form-group">
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(41, 40, 40, 1)","textAlign":"left"}' class="title">电影名称</view>
				<input :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(0,0,0,.6)","borderRadius":"16rpx","color":"rgba(40, 38, 38, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"88rpx"}' :disabled="ro.dianyingmingcheng" v-model="ruleForm.dianyingmingcheng" placeholder="电影名称"></input>
			</view>
												<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(252, 252, 252, 1)","margin":"","borderWidth":"0","borderStyle":"solid","height":"108rpx"}' class="cu-form-group select">
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(21, 20, 20, 1)","textAlign":"left"}' class="title">电影类型</view>
				<picker @change="dianyingleixingChange" :value="dianyingleixingIndex" :range="dianyingleixingOptions">
					<view :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(0,0,0,.6)","borderRadius":"16rpx","color":"rgba(20, 19, 19, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"88rpx"}' class="uni-input">{{ruleForm.dianyingleixing?ruleForm.dianyingleixing:"请选择电影类型"}}</view>
				</picker>
			</view>
												<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"#ccc","margin":"","borderWidth":"0","borderStyle":"solid","height":"108rpx"}' class="cu-form-group" @tap="haibaoTap" :class='left == "left"?"":"active"'>
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(23, 22, 22, 1)","textAlign":"left"}' class="title">海报</view>
				<view class="right-input" :style='{textAlign:"left"}' style="padding:0">
					<image :style='{"width":"88rpx","boxShadow":"0 0 16rpx rgba(0,0,0,.3)","borderRadius":"100%","textAlign":"left","height":"88rpx"}' class="avator" v-if="ruleForm.haibao" :src="ruleForm.haibao" mode="aspectFill"></image>
					<image :style='{"width":"88rpx","boxShadow":"0 0 16rpx rgba(0,0,0,.3)","borderRadius":"100%","textAlign":"left","height":"88rpx"}' class="avator" v-else src="../../static/gen/upload.png" mode="aspectFill"></image>
				</view>
			</view>
												<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"#ccc","margin":"","borderWidth":"0","borderStyle":"solid","height":"108rpx"}' class="cu-form-group">
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(41, 40, 40, 1)","textAlign":"left"}' class="title">导演</view>
				<input :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(0,0,0,.6)","borderRadius":"16rpx","color":"rgba(40, 38, 38, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"88rpx"}' :disabled="ro.daoyan" v-model="ruleForm.daoyan" placeholder="导演"></input>
			</view>
												<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"#ccc","margin":"","borderWidth":"0","borderStyle":"solid","height":"108rpx"}' class="cu-form-group">
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(41, 40, 40, 1)","textAlign":"left"}' class="title">主演</view>
				<input :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(0,0,0,.6)","borderRadius":"16rpx","color":"rgba(40, 38, 38, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"88rpx"}' :disabled="ro.zhuyan" v-model="ruleForm.zhuyan" placeholder="主演"></input>
			</view>
												<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"#ccc","margin":"","borderWidth":"0","borderStyle":"solid","height":"108rpx"}' class="cu-form-group">
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(41, 40, 40, 1)","textAlign":"left"}' class="title">上映日期</view>
				<input :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(0,0,0,.6)","borderRadius":"16rpx","color":"rgba(40, 38, 38, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"88rpx"}' v-model="ruleForm.shangyingriqi" placeholder="上映日期" @tap="toggleTab('shangyingriqi')"></input>
			</view>
												<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"#ccc","margin":"","borderWidth":"0","borderStyle":"solid","height":"108rpx"}' class="cu-form-group">
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(41, 40, 40, 1)","textAlign":"left"}' class="title">片长</view>
				<input :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(0,0,0,.6)","borderRadius":"16rpx","color":"rgba(40, 38, 38, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"88rpx"}' :disabled="ro.pianzhang" v-model="ruleForm.pianzhang" placeholder="片长"></input>
			</view>
												<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"#ccc","margin":"","borderWidth":"0","borderStyle":"solid","height":"108rpx"}' class="cu-form-group" @tap="dianyingyugaoTap" :class='left == "left"?"":"active"'>
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(23, 22, 22, 1)","textAlign":"left"}' class="title">电影预告</view>
				<view class="right-input" :style='{textAlign:"left"}' style="padding:0">
					<input :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(0,0,0,.6)","borderRadius":"16rpx","color":"rgba(40, 38, 38, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"88rpx"}' v-if="ruleForm.dianyingyugao"  v-model="ruleForm.dianyingyugao" placeholder="电影预告"></input>
					<image :style='{"width":"88rpx","boxShadow":"0 0 16rpx rgba(0,0,0,.3)","borderRadius":"100%","textAlign":"left","height":"88rpx"}' class="avator" v-else src="../../static/gen/upload.png" mode="aspectFill"></image>
				</view>
			</view>
																					<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(252, 252, 252, 1)","margin":"","borderWidth":"0","borderStyle":"solid","height":"108rpx"}' class="cu-form-group select">
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(21, 20, 20, 1)","textAlign":"left"}' class="title">影院名称</view>
				<picker @change="yingyuanmingchengChange" :value="yingyuanmingchengIndex" :range="yingyuanmingchengOptions">
					<view :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(0,0,0,.6)","borderRadius":"16rpx","color":"rgba(20, 19, 19, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"88rpx"}' class="uni-input">{{ruleForm.yingyuanmingcheng?ruleForm.yingyuanmingcheng:"请选择影院名称"}}</view>
				</picker>
			</view>
												<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(252, 252, 252, 1)","margin":"","borderWidth":"0","borderStyle":"solid","height":"108rpx"}' class="cu-form-group select">
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(21, 20, 20, 1)","textAlign":"left"}' class="title">放映厅</view>
				<picker @change="fangyingtingChange" :value="fangyingtingIndex" :range="fangyingtingOptions">
					<view :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(0,0,0,.6)","borderRadius":"16rpx","color":"rgba(20, 19, 19, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"88rpx"}' class="uni-input">{{ruleForm.fangyingting?ruleForm.fangyingting:"请选择放映厅"}}</view>
				</picker>
			</view>
												<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"#ccc","margin":"","borderWidth":"0","borderStyle":"solid","height":"108rpx"}' class="cu-form-group">
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(41, 40, 40, 1)","textAlign":"left"}' class="title">场次</view>
				<input :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(0,0,0,.6)","borderRadius":"16rpx","color":"rgba(40, 38, 38, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"88rpx"}' v-model="ruleForm.changci" placeholder="场次" @tap="toggleTab('changci')"></input>
			</view>
																														<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"#ccc","margin":"","borderWidth":"0","borderStyle":"solid","height":"108rpx"}' class="cu-form-group">
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(41, 40, 40, 1)","textAlign":"left"}' class="title">价格</view>
				<input :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(0,0,0,.6)","borderRadius":"16rpx","color":"rgba(40, 38, 38, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"88rpx"}' :disabled="ro.price" v-model="ruleForm.price" placeholder="价格"></input>
			</view>
												<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"#ccc","margin":"","borderWidth":"0","borderStyle":"solid","height":"108rpx"}' class="cu-form-group">
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(41, 40, 40, 1)","textAlign":"left"}' class="title">座位总数</view>
				<input :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"rgba(0,0,0,.6)","borderRadius":"16rpx","color":"rgba(40, 38, 38, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"88rpx"}' :disabled="ro.number" v-model="ruleForm.number" placeholder="座位总数"></input>
			</view>
																		
			<!-- 否 -->
 
			
			          				          				          				          				          				          				          				          				          				          				          				          				          				          				          				          				          				<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"#ccc","margin":"","borderWidth":"0","borderStyle":"solid","height":"308rpx"}' class="cu-form-group">
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(28, 27, 27, 1)","textAlign":"left"}' class="title">已选座位[用,号隔开]</view>
				<textarea :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 0)","borderColor":"rgba(0,0,0,.6)","borderRadius":"16rpx","color":"rgba(23, 22, 22, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"280rpx"}' v-model="ruleForm.selected" placeholder="已选座位[用,号隔开]"></textarea>
			</view>
									
			          				          				          				          				          				          				          				          				          				<view :style='{"boxShadow":"","backgroundColor":"rgba(255, 255, 255, 0.56)","borderColor":"#ccc","margin":"","borderWidth":"0","borderStyle":"solid","height":"308rpx"}' class="cu-form-group">
				<view :style='{"width":"160rpx","fontSize":"28rpx","color":"rgba(28, 27, 27, 1)","textAlign":"left"}' class="title">电影简介</view>
				<textarea :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,.6) inset","backgroundColor":"rgba(255, 255, 255, 0)","borderColor":"rgba(0,0,0,.6)","borderRadius":"16rpx","color":"rgba(23, 22, 22, 1)","textAlign":"left","borderWidth":"2rpx","fontSize":"28rpx","borderStyle":"solid","height":"280rpx"}' v-model="ruleForm.dianyingjianjie" placeholder="电影简介"></textarea>
			</view>
						          				          				          				          				          				          				          				          							
			<view class="btn">
				<button :style='{"boxShadow":"0 0 16rpx rgba(0,0,0,0) inset","backgroundColor":"#409EFF","borderColor":"#409EFF","borderRadius":"40rpx","color":"#fff","borderWidth":"1","width":"80%","fontSize":"28rpx","borderStyle":"solid","height":"80rpx"}' @tap="onSubmitTap" class="bg-red">提交</button>
			</view>
		</form>

																										<w-picker mode="dateTime" step="1" :current="false" :hasSecond="false" @confirm="shangyingriqiConfirm" ref="shangyingriqi" themeColor="#333333"></w-picker>
																												<w-picker mode="dateTime" step="1" :current="false" :hasSecond="false" @confirm="changciConfirm" ref="changci" themeColor="#333333"></w-picker>
								<w-picker mode="dateTime" step="1" :current="false" :hasSecond="false" @confirm="clicktimeConfirm" ref="clicktime" themeColor="#333333"></w-picker>
																							
	</view>
</template>

<script>
	import wPicker from "@/components/w-picker/w-picker.vue";

	export default {
		data() {
			return {
				ruleForm: {
												dianyingmingcheng: '',
																dianyingleixing: '',
																haibao: '',
																daoyan: '',
																zhuyan: '',
																shangyingriqi: '',
																pianzhang: '',
																dianyingyugao: '',
																dianyingjianjie: '',
																yingyuanmingcheng: '',
																fangyingting: '',
																changci: '',
																clicktime: '',
																clicknum: '',
																price: '',
																number: '',
																selected: '',
												},
																				dianyingleixingOptions: [],
				dianyingleixingIndex: 0,
																																																																								yingyuanmingchengOptions: [],
				yingyuanmingchengIndex: 0,
																fangyingtingOptions: [],
				fangyingtingIndex: 0,
																																																												// 登陆用户信息
				user: {},
                                ro:{
                                   dianyingmingcheng : false,
                                   dianyingleixing : false,
                                   haibao : false,
                                   daoyan : false,
                                   zhuyan : false,
                                   shangyingriqi : false,
                                   pianzhang : false,
                                   dianyingyugao : false,
                                   dianyingjianjie : false,
                                   yingyuanmingcheng : false,
                                   fangyingting : false,
                                   changci : false,
                                   clicktime : false,
                                   clicknum : false,
                                   price : false,
                                   number : false,
                                   selected : false,
                                },
			}
		},
		components: {
			wPicker
		},
		computed: {
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
						
					},
		async onLoad(options) {
			let table = uni.getStorageSync("nowTable");
			// 获取用户信息
			let res = await this.$api.session(table);
			this.user = res.data;
			
						// ss读取
																																																																																																												
																		// 下拉框
			res = await this.$api.option(`dianyingleixing`,`dianyingleixing`,{});
			this.dianyingleixingOptions = res.data;
																																																						// 下拉框
			res = await this.$api.option(`yingyuanxinxi`,`yingyuanmingcheng`,{});
			this.yingyuanmingchengOptions = res.data;
												// 下拉框
			res = await this.$api.option(`fangyingting`,`fangyingting`,{});
			this.fangyingtingOptions = res.data;
																																													
			// 如果有登陆，获取登陆后保存的userid
			this.ruleForm.userid = uni.getStorageSync("userid")
			if (options.refid) {
				// 如果上一级页面传递了refid，获取改refid数据信息
				this.ruleForm.refid = options.refid;
				this.ruleForm.nickname = uni.getStorageSync("nickname");
			}
			// 如果是更新操作
			if (options.id) {
				this.ruleForm.id = options.id;
				// 获取信息
				res = await this.$api.info(`dianyingxinxi`, this.ruleForm.id);
				this.ruleForm = res.data;
			}
			// 跨表
			if(options.cross){
				var obj = uni.getStorageSync('crossObj');
				for (var o in obj){
					if(o=='dianyingmingcheng'){
					this.ruleForm.dianyingmingcheng = obj[o];
					this.ro.dianyingmingcheng = true;
					continue;
					}
					if(o=='dianyingleixing'){
					this.ruleForm.dianyingleixing = obj[o];
					this.ro.dianyingleixing = true;
					continue;
					}
					if(o=='haibao'){
					this.ruleForm.haibao = obj[o];
					this.ro.haibao = true;
					continue;
					}
					if(o=='daoyan'){
					this.ruleForm.daoyan = obj[o];
					this.ro.daoyan = true;
					continue;
					}
					if(o=='zhuyan'){
					this.ruleForm.zhuyan = obj[o];
					this.ro.zhuyan = true;
					continue;
					}
					if(o=='shangyingriqi'){
					this.ruleForm.shangyingriqi = obj[o];
					this.ro.shangyingriqi = true;
					continue;
					}
					if(o=='pianzhang'){
					this.ruleForm.pianzhang = obj[o];
					this.ro.pianzhang = true;
					continue;
					}
					if(o=='dianyingyugao'){
					this.ruleForm.dianyingyugao = obj[o];
					this.ro.dianyingyugao = true;
					continue;
					}
					if(o=='dianyingjianjie'){
					this.ruleForm.dianyingjianjie = obj[o];
					this.ro.dianyingjianjie = true;
					continue;
					}
					if(o=='yingyuanmingcheng'){
					this.ruleForm.yingyuanmingcheng = obj[o];
					this.ro.yingyuanmingcheng = true;
					continue;
					}
					if(o=='fangyingting'){
					this.ruleForm.fangyingting = obj[o];
					this.ro.fangyingting = true;
					continue;
					}
					if(o=='changci'){
					this.ruleForm.changci = obj[o];
					this.ro.changci = true;
					continue;
					}
					if(o=='clicktime'){
					this.ruleForm.clicktime = obj[o];
					this.ro.clicktime = true;
					continue;
					}
					if(o=='clicknum'){
					this.ruleForm.clicknum = obj[o];
					this.ro.clicknum = true;
					continue;
					}
					if(o=='price'){
					this.ruleForm.price = obj[o];
					this.ro.price = true;
					continue;
					}
					if(o=='number'){
					this.ruleForm.number = obj[o];
					this.ro.number = true;
					continue;
					}
					if(o=='selected'){
					this.ruleForm.selected = obj[o];
					this.ro.selected = true;
					continue;
					}
				}
			}
			this.styleChange()
		},
		methods: {
			styleChange() {
				this.$nextTick(()=>{
					// document.querySelectorAll('.app-update-pv .cu-form-group .uni-input-input').forEach(el=>{
					//   el.style.backgroundColor = this.addUpdateForm.input.content.backgroundColor
					// })
				})
			},
																																																																																																												
			// 多级联动参数
																																																																																																												
																																																																																																									
																																							// 日长控件选择日期时间
			shangyingriqiConfirm(val) {
				console.log(val)
				this.ruleForm.shangyingriqi = val.result;
				this.$forceUpdate();
			},
																																										// 日长控件选择日期时间
			changciConfirm(val) {
				console.log(val)
				this.ruleForm.changci = val.result;
				this.$forceUpdate();
			},
												// 日长控件选择日期时间
			clicktimeConfirm(val) {
				console.log(val)
				this.ruleForm.clicktime = val.result;
				this.$forceUpdate();
			},
																														
															// 下拉变化
			dianyingleixingChange(e) {
				this.dianyingleixingIndex = e.target.value
				this.ruleForm.dianyingleixing = this.dianyingleixingOptions[this.dianyingleixingIndex]
			},
																																																						// 下拉变化
			yingyuanmingchengChange(e) {
				this.yingyuanmingchengIndex = e.target.value
				this.ruleForm.yingyuanmingcheng = this.yingyuanmingchengOptions[this.yingyuanmingchengIndex]
			},
												// 下拉变化
			fangyingtingChange(e) {
				this.fangyingtingIndex = e.target.value
				this.ruleForm.fangyingting = this.fangyingtingOptions[this.fangyingtingIndex]
			},
																																										
																											haibaoTap() {
				let _this = this;
				this.$api.upload(function(res) {
					_this.ruleForm.haibao = _this.$base.url + 'upload/' + res.file;
					_this.$forceUpdate();
					_this.$nextTick(()=>{
						_this.styleChange()
					})
				});
			},
																																																			dianyingyugaoTap() {
				let _this = this;
				this.$api.upload(function(res) {
					_this.ruleForm.dianyingyugao = _this.$base.url + 'upload/' + res.file;
					_this.$forceUpdate();
					_this.$nextTick(()=>{
						_this.styleChange()
					})
				});
			},
																																																																																										
			getUUID () {
				return new Date().getTime();
			},
			async onSubmitTap() {
																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																if((!this.ruleForm.dianyingmingcheng)){
					this.$utils.msg(`电影名称不能为空`);
					return
				}
																																								if((!this.ruleForm.dianyingleixing)){
					this.$utils.msg(`电影类型不能为空`);
					return
				}
																																																																																																																																																																																																																																																																																																																																																																																																												if(this.ruleForm.clicknum&&(!this.$validate.isIntNumer(this.ruleForm.clicknum))){
					this.$utils.msg(`点击次数应输入整数`);
					return
				}
																																				if((!this.ruleForm.price)){
					this.$utils.msg(`价格不能为空`);
					return
				}
																if(this.ruleForm.price&&(!this.$validate.isNumber(this.ruleForm.price))){
					this.$utils.msg(`价格应输入数字`);
					return
				}
																																if((!this.ruleForm.number)){
					this.$utils.msg(`座位总数不能为空`);
					return
				}
												if(this.ruleForm.number&&(!this.$validate.isIntNumer(this.ruleForm.number))){
					this.$utils.msg(`座位总数应输入整数`);
					return
				}
																																																																if(this.ruleForm.id){
					await this.$api.update(`dianyingxinxi`, this.ruleForm);
				}else{
					await this.$api.add(`dianyingxinxi`, this.ruleForm);
				}
				this.$utils.msgBack('提交成功');
			},
			optionsChange(e) {
				this.index = e.target.value
			},
			bindDateChange(e) {
				this.date = e.target.value
			},
			getDate(type) {
				const date = new Date();
				let year = date.getFullYear();
				let month = date.getMonth() + 1;
				let day = date.getDate();
				if (type === 'start') {
					year = year - 60;
				} else if (type === 'end') {
					year = year + 2;
				}
				month = month > 9 ? month : '0' + month;;
				day = day > 9 ? day : '0' + day;
				return `${year}-${month}-${day}`;
			},
			toggleTab(str) {
				this.$refs[str].show();
			}
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		padding: 20upx;
	}
	
	.content:after {
		position: fixed;
		top: 0;
		right: 0;
		left: 0;
		bottom: 0;
		content: '';
				background-attachment: fixed;
		background-size: cover;
		background-position: center;
	}

	textarea {
		border: 1upx solid #EEEEEE;
		border-radius: 20upx;
		padding: 20upx;
	}

	.title {
		width: 180upx;
	}

	.avator {
		width: 150upx;
		height: 60upx;
	}

	.right-input {
		flex: 1;
		text-align: left;
		padding: 0 24upx;
	}
	
	.cu-form-group.active {
		justify-content: space-between;
	}
	
	.btn {
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  flex-wrap: wrap;
	  padding: 20upx 0;
	}
	
	.cu-form-group {
		padding: 0 24upx;
		background-color: transparent;
		min-height: inherit;
	}
	
	.cu-form-group+.cu-form-group {
		border: 0;
	}
	
	.cu-form-group uni-input {
		padding: 0 30upx;
	}
	
	.uni-input {
		padding: 0 30upx;
	}
	
	.cu-form-group uni-textarea {
		padding: 30upx;
		margin: 0;
	}
	
	.cu-form-group uni-picker::after {
		line-height: 88rpx;
	}
	
	.select .uni-input {
		line-height: 88rpx;
	}
	
	.input .right-input {
		line-height: 88rpx;
	}
</style>
